package com.cans.base.utils;

import java.util.Calendar;

/**
 * description: 文件路径操作工具类
 *
 * @author cans
 * @date 2018/8/5
 */
public class FilePathUtil {

    /**
     * 根据当前日期创建文件目录
     * @return
     */
    public static String generateFilePathByDate(){

        Calendar instance = Calendar.getInstance();

        Integer year = instance.get(Calendar.YEAR);
        Integer month = instance.get(Calendar.MONTH) + 1;
        Integer date = instance.get(Calendar.DATE);

        return year.toString() + "/" + month.toString() + "/" + date.toString() + "/";
    }
}
